package com.gitee.srurl.core.api.impl.domain;

import com.gitee.srurl.core.annotation.ApiImpl;
import com.gitee.srurl.core.api.IDomainSelector;
import com.gitee.srurl.core.constant.ApiTypeConstant;
import com.gitee.srurl.core.util.SpringContextUtil;

/**
 * @author zxw
 * @date 2023/4/29 8:26
 */
@ApiImpl(ApiTypeConstant.DomainSelector.DEFAULT)
public class DefaultDomainSelector implements IDomainSelector {

    private final String domain = SpringContextUtil.getRequiredProperty("short-url.domain.default-domain");

    @Override
    public String selector(String url) {

        return this.domain;
    }
}
